package com.demo.taghandler;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class MySimpleTagHandler extends SimpleTagSupport {
 
	private int value;
	 public void setValue(int value) {
		this.value = value;
	}
	 
	 
	 public int getValue() {
		return value;
	}
	

	@Override
	public void doTag() throws JspException, IOException {
		System.out.println("do tag method executed successfully");
	
		 for (int i = 1; i <= 10; i++) {
			
			 getJspContext().setAttribute("result", i*getValue());
			 getJspBody().invoke(null); //execute body and write on response
			 /*getJspContext().getOut().write(i*getValue()+"<br>");*/
			 
		}
		
		
	
	}
	
	
}
